import React from "react";
import ReactDOM from "react-dom/client";
// import "./style.css";
import style from "./style.module.css";

/**
 * class 组件
 */
class MyComponent extends React.Component {
  render() {
    return (
      // // 行内（内联）样式
      // <div style={{ width: "200px", height: "100px", backgroundColor: "#ccc" }}>
      // // class
      // <div className="container">你好，{this.props.title}！！！</div>

      // css in js: css moudles
      <div className={style.box}>你好，{this.props.title}！！！</div>
    );
  }
}

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<MyComponent title="千锋" />);
